'use strict';

const Controller = require('egg').Controller;
/**
* @controller MacController 注释必写，swagger-doc是根据这段注释来生成接口的 ）。
*/

class MacController extends Controller {
  async list() {
       /**
        * @summary mac列表分页。
        * @description mac列表分页。
        * @router get /maclist
        * @request query integer limit
        * @request query integer page
        * @request query String OltId
        * @request query String PhysicalPort
        * @request query String search
        */
    const params = this.ctx.query
    const result = await this.ctx.service.mac.list(params)
    this.ctx.body = {
        msg:"",
        status:200,
        data:result.rows,
        count:result.count,
    }
  }
  async macPhysicalPort(){
    /**
        * @summary macPhysicalPort。
        * @description macPhysicalPort。
        * @router get /macPhysicalPort
        * @request query String OltId
        */
       const params = this.ctx.query
       const result = await this.ctx.service.mac.macPhysicalPort(params)
       this.ctx.body = {
        msg:"",
        status:200,
        data:result,
    }
  }
}

module.exports = MacController;
